import { Switch, Route } from 'react-router-dom'
import PrivateAdmin from './admin/PrivateAdmin'
import PrivateUser from './admin/PrivateUser'
import AdminDash from './admin/AdminDash'
import UserDash from './admin/UserDash'
import Signin from './core/Signin'
import Signup from './core/Signup'
import Home from './core/Home'
import Shop from './core/Shop'
import AddCategory from './admin/AddCategory'
import AddProduct from './admin/AddProduct'
import Product from './core/Product'
import Cart from './core/cart'
import Ordere from './core/Order'

export default function Routes() {
    return (
        <Switch>
            <Route exact path='/' component={Home} />
            <Route exact path='/shop' component={Shop} />
            <Route exact path='/signin' component={Signin} />
            <Route exact path='/signup' component={Signup} />
            <PrivateUser exact path='/user/dashboard' component={UserDash} />
            <PrivateAdmin exact path='/admin/dashboard' component={AdminDash} />
            <PrivateAdmin exact path='/admin/category' component={AddCategory} />
            <PrivateAdmin exact path='/admin/product' component={AddProduct} />
            <PrivateAdmin exact path='/admin/order' component={Ordere} />
            <Route path='/product/:productId' component={Product} />
            <Route path='/cart' component={Cart}/>
        </Switch>
    )
}